package lambda;

public class Test {

    public static void main(String[] args) {

        MyFunctionInterface inter = new MyFunctionInterface() {
            @Override
            public void fn() {
                System.out.println("实现了 fn()....");
            }
        };

        inter.fn();

        //使用lambda表达式
        MyFunctionInterface inter2 = ()-> System.out.println("实现了 fn()....");

        inter2.fn();
    }
}
